import request from '@/utils/request'


//评论创建数据
export function commentCreate(data) {
    return request({
      url: '/comment/create',
      method: 'post',
      data:data
    })
  }
//评论通过id修改数据
export function commentUpdate(id,data) {
    return request({
      url: '/comment/update/'+id,
      method: 'put',
      data:data
    })
  }
//删除多个多条数据(传递字符串)
export function commentRemoves(data) {
    return request({
      url: '/comment/removes',
      method: 'delete',
      data:{ids:data.toString()}
    })
  }
//删除单条数据
export function commentDelete(id) {
    return request({
      url: '/comment/delete/'+id,
      method: 'delete'
    })
  }
//获取传递过来的id的数据
export function commentListId(id) {
    return request({
      url: '/comment/list/'+id,
      method: 'get'
    })
  }
//获取有页码字段的所有数据
export function commentListPage(data) {
    return request({
      url: '/comment/list',
      method: 'post',
      data:data
    })
  }
